<template>
  <div class="brand">
      <div class="title">品牌商直供</div>
    <ul>
      <li v-for="item in brandList" :key="item.id" @click="btn(item.id)">
        <img :src="item.pic_url" alt />
        <div class="txt">
          <h4>{{item.name}}</h4>
          <p>{{item.floor_price | yuan}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
 
<script>



export default {
  props: ["brandList"],
  methods: {
    btn(id){
      this.$router.push("/brandetail/"+id)
    },
  }
};
</script>
 
<style lang = "less" scoped>
.brand {
  background: #fff;
  margin-top: 20px;
  padding-bottom: 5px;
  ul {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    li {
      position: relative;
      width: 49%;
      img {
        width: 100%;
      }
      .txt {
        position: absolute;
        top: 10px;
        left: 10px;
        line-height: 20px;
        p{color: darkred;}
      }
    }
  }
}
</style>